package com.spring.cloud.enums;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 异常枚举
 * @author hd
 * @date 2019/3/31
 */
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnum {

    USER_NOT_FOUND(404, "用户查询失败"),

    INVALID_FILE_FORMAT(400, "文件格式错误"),
    UPLOAD_IMAGE_EXCEPTION(500, "文件上传异常"),
    INVALID_PARAM(400, "参数错误"),
    USERNAME_OR_PASSWORD_ERROR(400, "账号或密码错误"),
    VERIFY_CODE_NOT_MATCHING(400, "验证码错误"),
    PASSWORD_NOT_MATCHING(400, "密码错误"),
    USER_NOT_EXIST(404, "用户不存在"),
    CREATE_TOKEN_ERROR(404, "用户不存在")

    ;
    int value;
    String message;

    public int value() {
        return this.value;
    }

    public String message() {
        return this.message;
    }


}
